package com.company.project.controller.ldjsc.jjyx;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.company.project.entity.ldjsc.jjyx.JscJjyxZyjyhhbEntity;
import com.company.project.entity.ldjsc.jjyx.JscwzTbJobAffairsEntity;
import com.company.project.service.ldjsc.jjyx.JscwzTbJobAffairsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.company.project.common.utils.DataResult;





/**
 * 工作动态
 *
 * @author wenbin
 * @email *****@mail.com
 * @date 2025-08-05 15:44:56
 */
@Controller
@RequestMapping("/sxzy")
public class JscwzTbJobAffairsController {
    @Autowired
    private JscwzTbJobAffairsService jscwzTbJobAffairsService;

    /**
     *经济运行
     */
    @ApiOperation(value = "经济运行检测报告-详情")
    @GetMapping("/jsc-dd-zt/JscJjyxjcbg2")
    @ResponseBody
    public DataResult JscJjyxjcbg2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getId, jscwzTbJobAffairs.getId());
        queryWrapper.orderByDesc(JscwzTbJobAffairsEntity::getData_time);
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }

    /**
     *经济运行
     */
    @ApiOperation(value = "经济运行检测报告-列表")
    @GetMapping("/jsc-dd-zt/JscJjyxjcbglb2")
    @ResponseBody
    public DataResult JscJjyxjcbglb2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getSource, jscwzTbJobAffairs.getSource());
        queryWrapper.eq(JscwzTbJobAffairsEntity::getJob_type, jscwzTbJobAffairs.getJob_type());
        queryWrapper.orderByDesc(JscwzTbJobAffairsEntity::getData_time);
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }

    /**
     *经济运行
     */
    @ApiOperation(value = "重点工程情况分析-详情")
    @GetMapping("/jsc-dd-zt/JscZdgcfxxx2")
    @ResponseBody
    public DataResult JscZdgcfxxx2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getId, jscwzTbJobAffairs.getId());
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }

    /**
     *经济运行
     */
    @ApiOperation(value = "重点工程情况分析-列表")
    @GetMapping("/jsc-dd-zt/JscZdgcqkfx2")
    @ResponseBody
    public DataResult JscZdgcqkfx2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getSource, jscwzTbJobAffairs.getSource());
        queryWrapper.eq(JscwzTbJobAffairsEntity::getJob_type, jscwzTbJobAffairs.getJob_type());
        queryWrapper.orderByDesc(JscwzTbJobAffairsEntity::getData_time);
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }


    /**
     *省财政厅
     */
    @ApiOperation(value = "财政收支分析-详情")
    @GetMapping("/jsc-dd-zt/JscCzszfxxx2")
    @ResponseBody
    public DataResult JscCzszfxxx2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getId, jscwzTbJobAffairs.getId());
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }


    /**
     *省财政厅
     */
    @ApiOperation(value = "财政收支分析-列表")
    @GetMapping("/jsc-dd-zt/JscCzszfxlb2")
    @ResponseBody
    public DataResult JscCzszfxlb2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getSource, jscwzTbJobAffairs.getSource());
        queryWrapper.eq(JscwzTbJobAffairsEntity::getJob_type, jscwzTbJobAffairs.getJob_type());
        queryWrapper.orderByDesc(JscwzTbJobAffairsEntity::getData_time);
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }


    /**
     *省工信厅
     */
    @ApiOperation(value = "信息产业-详情")
    @GetMapping("/jsc-dd-zt/JscXxcy2")
    @ResponseBody
    public DataResult JscXxcy2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getId, jscwzTbJobAffairs.getId());
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }


    /**
     *省工信厅
     */
    @ApiOperation(value = "信息产业-列表")
    @GetMapping("/jsc-dd-zt/JscXxzyxx2")
    @ResponseBody
    public DataResult JscXxzyxx2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getSource, jscwzTbJobAffairs.getSource());
        queryWrapper.eq(JscwzTbJobAffairsEntity::getJob_type, jscwzTbJobAffairs.getJob_type());
        queryWrapper.orderByDesc(JscwzTbJobAffairsEntity::getData_time);
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }

    /**
     *省工信厅
     */
    @ApiOperation(value = "交通物流-详情")
    @GetMapping("/jsc-dd-zt/JscJtwlxx2")
    @ResponseBody
    public DataResult JscJtwlxx2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getId, jscwzTbJobAffairs.getId());
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }


    /**
     *省工信厅
     */
    @ApiOperation(value = "交通物流-列表")
    @GetMapping("/jsc-dd-zt/JscJtwl2")
    @ResponseBody
    public DataResult JscJtwl2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getSource, jscwzTbJobAffairs.getSource());
        queryWrapper.eq(JscwzTbJobAffairsEntity::getJob_type, jscwzTbJobAffairs.getJob_type());
        queryWrapper.orderByDesc(JscwzTbJobAffairsEntity::getData_time);
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }


    /**
     *省发改委
     */
    @ApiOperation(value = "固定资产投资工作动态-详情")
    @GetMapping("/jsc-dd-zt/JscGdzctzGzdtXx2")
    @ResponseBody
    public DataResult JscGdzctzGzdtXx2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getId, jscwzTbJobAffairs.getId());
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }


    /**
     *省发改委
     */
    @ApiOperation(value = "固定资产投资工作动态-列表")
    @GetMapping("/jsc-dd-zt/JscGdzctzGzdtLb2")
    @ResponseBody
    public DataResult JscGdzctzGzdtLb2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getSource, jscwzTbJobAffairs.getSource());
        queryWrapper.eq(JscwzTbJobAffairsEntity::getJob_type, jscwzTbJobAffairs.getJob_type());
        queryWrapper.orderByDesc(JscwzTbJobAffairsEntity::getData_time);
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }




    /**
     *省发改委
     */
    @ApiOperation(value = "价格管理居民消费价格指数-详情")
    @GetMapping("/jsc-dd-zt/JscJggljmxfJgzbXx2")
    @ResponseBody
    public DataResult JscJggljmxfJgzbXx2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getId, jscwzTbJobAffairs.getId());
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }


    /**
     *省发改委
     */
    @ApiOperation(value = "价格管理居民消费价格指数-列表")
    @GetMapping("/jsc-dd-zt/JscJggljmxfJgzbLb2")
    @ResponseBody
    public DataResult JscJggljmxfJgzbLb2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getSource, jscwzTbJobAffairs.getSource());
        queryWrapper.eq(JscwzTbJobAffairsEntity::getJob_type, jscwzTbJobAffairs.getJob_type());
        queryWrapper.orderByDesc(JscwzTbJobAffairsEntity::getData_time);
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }

    /**
     *文章数据
     */
    @ApiOperation(value = "工作动态-详情")
    @GetMapping("/jsc-dd-zt/JscAffairsXx2")
    @ResponseBody
    public DataResult JscAffairsXx2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getId, jscwzTbJobAffairs.getId());
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }

    /**
     *文章数据
     */
    @ApiOperation(value = "工作动态-列表")
    @GetMapping("/jsc-dd-zt/JscAffairsLb2")
    @ResponseBody
    public DataResult JscAffairsLb2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        queryWrapper.eq(JscwzTbJobAffairsEntity::getSource, jscwzTbJobAffairs.getSource());
        queryWrapper.eq(JscwzTbJobAffairsEntity::getJob_type, jscwzTbJobAffairs.getJob_type());
        queryWrapper.orderByDesc(JscwzTbJobAffairsEntity::getData_time);
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }

    /**
     *文章数据
     */
    @ApiOperation(value = "工作动态")
    @GetMapping("/jsc-dd-zt/getJscwzAffairs2")
    @ResponseBody
    public DataResult getJscwzAffairs2(JscwzTbJobAffairsEntity jscwzTbJobAffairs){
        LambdaQueryWrapper<JscwzTbJobAffairsEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        IPage<JscwzTbJobAffairsEntity> iPage = jscwzTbJobAffairsService.page(jscwzTbJobAffairs.getQueryPage(), queryWrapper);
        List<JscwzTbJobAffairsEntity> records = iPage.getRecords();

        // 构造所需的数据结构
        List<String> columnNames = Arrays.asList(
                "id",
                "sort",
                "job_type",
                "title",
                "detail",
                "depart",
                "data_time",
                "index_no",
                "source",
                "update_time",
                "is_main"
        );

        Map<String, Object> result = new HashMap<>();
        result.put("columnNames", columnNames);
        result.put("value", records);

        return DataResult.success(result);
    }
}
